---

apiVersion: v1
data:
  admin-password: UEA4OHcwcmQK
  jwt-secret: {{ ks_secret_str | b64encode }}
kind: Secret
metadata:
  annotations:
    kubesphere.io/creator: system
  name: ks-account-secret
  namespace: kubesphere-system
type: Opaque

---

apiVersion: v1
data:
  users.json: |
    [{"username":"sonarqube","password":"sonarqube","cluster_role":"cluster-regular","hidden":true}]
kind: ConfigMap
metadata:
  name: user-init
  namespace: kubesphere-system

---

apiVersion: v1
data:
  clusterrules.json: |
    [
      {
        "name": "projects",
        "actions": [
          {
            "name": "manage",
            "rules": [
              {
                "verbs": [
                  "get",
                  "list",
                  "patch",
                  "update"
                ],
                "apiGroups": [
                  "",
                  "resources.kubesphere.io"
                ],
                "resources": [
                  "namespaces"
                ]
              },
              {
                "verbs": [
                  "list"
                ],
                "apiGroups": [
                  "iam.kubesphere.io"
                ],
                "resources": [
                  "users"
                ]
              },
              {
                "verbs": [
                  "list"
                ],
                "apiGroups": [
                  "resources.kubesphere.io"
                ],
                "resources": [
                  "workspaces"
                ]
              },
              {
                "verbs": [
                  "get"
                ],
                "apiGroups": [
                  "iam.kubesphere.io"
                ],
                "resources": [
                  "workspaces/members"
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "workspaces",
        "actions": [
          {
            "name": "manage",
            "rules": [
              {
                "verbs": [
                  "*"
                ],
                "apiGroups": [
                  "*"
                ],
                "resources": [
                  "workspaces",
                  "workspaces/*"
                ]
              },
              {
                "verbs": [
                  "list"
                ],
                "apiGroups": [
                  "iam.kubesphere.io"
                ],
                "resources": [
                  "users"
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "monitoring",
        "actions": [
          {
            "name": "view",
            "rules": [
              {
                "verbs": [
                  "get",
                  "list"
                ],
                "apiGroups": [
                  "monitoring.kubesphere.io",
                  "monitoring.coreos.com"
                ],
                "resources": [
                  "*"
                ]
              },
              {
                "verbs": [
                  "get",
                  "list"
                ],
                "apiGroups": [
                  "",
                  "resources.kubesphere.io"
                ],
                "resources": [
                  "componenthealth",
                  "components",
                  "nodes",
                  "events",
                  "pods"
                ]
              },
              {
                "verbs": [
                  "get"
                ],
                "apiGroups": [
                  ""
                ],
                "resources": [
                  "namespaces"
                ]
              },
              {
                "verbs": [
                  "list"
                ],
                "apiGroups": [
                  "resources.kubesphere.io"
                ],
                "resources": [
                  "pods"
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "alerting",
        "actions": [
          {
            "name": "view",
            "rules": [
              {
                "verbs": [
                  "get",
                  "list"
                ],
                "apiGroups": [
                  "alerting.kubesphere.io"
                ],
                "resources": [
                  "*"
                ]
              }
            ]
          },
          {
            "name": "create",
            "rules": [
              {
                "verbs": [
                  "create"
                ],
                "apiGroups": [
                  "alerting.kubesphere.io"
                ],
                "resources": [
                  "*"
                ]
              }
            ]
          },
          {
            "name": "edit",
            "rules": [
              {
                "verbs": [
                  "get",
                  "list",
                  "update",
                  "patch"
                ],
                "apiGroups": [
                  "alerting.kubesphere.io"
                ],
                "resources": [
                  "*"
                ]
              }
            ]
          },
          {
            "name": "delete",
            "rules": [
              {
                "verbs": [
                  "delete"
                ],
                "apiGroups": [
                  "alerting.kubesphere.io"
                ],
                "resources": [
                  "*"
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "logging",
        "actions": [
          {
            "name": "view",
            "rules": [
              {
                "verbs": [
                  "get",
                  "list"
                ],
                "apiGroups": [
                  "logging.kubesphere.io"
                ],
                "resources": [
                  "*"
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "accounts",
        "actions": [
          {
            "name": "view",
            "rules": [
              {
                "verbs": [
                  "get",
                  "watch",
                  "list"
                ],
                "apiGroups": [
                  "iam.kubesphere.io"
                ],
                "resources": [
                  "users",
                  "users/*"
                ]
              },
              {
                "verbs": [
                  "get"
                ],
                "apiGroups": [
                  "iam.kubesphere.io"
                ],
                "resources": [
                  "rulesmapping"
                ],
                "resourceNames": [
                  "*"
                ]
              },
              {
                "verbs": [
                  "get",
                  "watch",
                  "list"
                ],
                "apiGroups": [
                  "rbac.authorization.k8s.io"
                ],
                "resources": [
                  "clusterrolebindings"
                ]
              }
            ]
          },
          {
            "name": "create",
            "rules": [
              {
                "verbs": [
                  "list"
                ],
                "apiGroups": [
                  "iam.kubesphere.io",
                  "rbac.authorization.k8s.io"
                ],
                "resources": [
                  "clusterroles"
                ]
              },
              {
                "verbs": [
                  "get",
                  "watch",
                  "list",
                  "create"
                ],
                "apiGroups": [
                  "iam.kubesphere.io"
                ],
                "resources": [
                  "users"
                ]
              },
              {
                "verbs": [
                  "get"
                ],
                "apiGroups": [
                  "iam.kubesphere.io"
                ],
                "resources": [
                  "rulesmapping"
                ],
                "resourceNames": [
                  "*"
                ]
              },
              {
                "verbs": [
                  "create",
                  "delete",
                  "deletecollection"
                ],
                "apiGroups": [
                  "rbac.authorization.k8s.io"
                ],
                "resources": [
                  "clusterrolebindings"
                ]
              }
            ]
          },
          {
            "name": "edit",
            "rules": [
              {
                "verbs": [
                  "update",
                  "patch"
                ],
                "apiGroups": [
                  "iam.kubesphere.io"
                ],
                "resources": [
                  "users"
                ]
              },
              {
                "verbs": [
                  "list"
                ],
                "apiGroups": [
                  "iam.kubesphere.io",
                  "rbac.authorization.k8s.io"
                ],
                "resources": [
                  "clusterroles"
                ]
              },
              {
                "verbs": [
                  "create",
                  "delete",
                  "deletecollection"
                ],
                "apiGroups": [
                  "rbac.authorization.k8s.io"
                ],
                "resources": [
                  "clusterrolebindings"
                ]
              }
            ]
          },
          {
            "name": "delete",
            "rules": [
              {
                "verbs": [
                  "delete",
                  "deletecollection"
                ],
                "apiGroups": [
                  "iam.kubesphere.io"
                ],
                "resources": [
                  "users"
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "roles",
        "actions": [
          {
            "name": "view",
            "rules": [
              {
                "verbs": [
                  "get",
                  "watch",
                  "list"
                ],
                "apiGroups": [
                  "rbac.authorization.k8s.io"
                ],
                "resources": [
                  "clusterroles"
                ]
              },
              {
                "verbs": [
                  "get",
                  "list"
                ],
                "apiGroups": [
                  "iam.kubesphere.io"
                ],
                "resources": [
                  "clusterroles",
                  "clusterroles/*"
                ]
              }
            ]
          },
          {
            "name": "create",
            "rules": [
              {
                "verbs": [
                  "create"
                ],
                "apiGroups": [
                  "rbac.authorization.k8s.io"
                ],
                "resources": [
                  "clusterroles"
                ]
              }
            ]
          },
          {
            "name": "edit",
            "rules": [
              {
                "verbs": [
                  "update",
                  "patch"
                ],
                "apiGroups": [
                  "rbac.authorization.k8s.io"
                ],
                "resources": [
                  "clusterroles"
                ]
              }
            ]
          },
          {
            "name": "delete",
            "rules": [
              {
                "verbs": [
                  "delete",
                  "deletecollection"
                ],
                "apiGroups": [
                  "rbac.authorization.k8s.io"
                ],
                "resources": [
                  "clusterroles"
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "storageclasses",
        "actions": [
          {
            "name": "view",
            "rules": [
              {
                "verbs": [
                  "get",
                  "watch",
                  "list"
                ],
                "apiGroups": [
                  "",
                  "storage.k8s.io",
                  "resources.kubesphere.io",
                  "metrics.kubesphere.io"
                ],
                "resources": [
                  "pods",
                  "persistentvolumeclaims",
                  "storageclasses",
                  "storageclasses/*"
                ]
              }
            ]
          },
          {
            "name": "create",
            "rules": [
              {
                "verbs": [
                  "create"
                ],
                "apiGroups": [
                  "storage.k8s.io"
                ],
                "resources": [
                  "storageclasses"
                ]
              }
            ]
          },
          {
            "name": "edit",
            "rules": [
              {
                "verbs": [
                  "update",
                  "patch"
                ],
                "apiGroups": [
                  "storage.k8s.io"
                ],
                "resources": [
                  "storageclasses"
                ]
              }
            ]
          },
          {
            "name": "delete",
            "rules": [
              {
                "verbs": [
                  "delete",
                  "deletecollection"
                ],
                "apiGroups": [
                  "storage.k8s.io"
                ],
                "resources": [
                  "storageclasses"
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "nodes",
        "actions": [
          {
            "name": "view",
            "rules": [
              {
                "verbs": [
                  "get",
                  "watch",
                  "list"
                ],
                "apiGroups": [
                  "",
                  "resources.kubesphere.io",
                  "monitoring.kubesphere.io"
                ],
                "resources": [
                  "pods",
                  "nodes",
                  "nodes/*",
                  "events"
                ]
              }
            ]
          },
          {
            "name": "edit",
            "rules": [
              {
                "verbs": [
                  "update",
                  "patch"
                ],
                "apiGroups": [
                  ""
                ],
                "resources": [
                  "nodes"
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "apps",
        "actions": [
          {
            "name": "view",
            "rules": [
              {
                "verbs": [
                  "get",
                  "list"
                ],
                "apiGroups": [
                  "openpitrix.io"
                ],
                "resources": [
                  "applications",
                  "apps",
                  "apps/versions",
                  "apps/events",
                  "categories",
                  "attachments"
                ]
              }
            ]
          },
          {
            "name": "manage",
            "rules": [
              {
                "verbs": [
                  "*"
                ],
                "apiGroups": [
                  "openpitrix.io"
                ],
                "resources": [
                  "*"
                ]
              }
            ]
          }
        ]
      }
    ]
  rules.json: |
    [
      {
        "name": "projects",
        "actions": [
          {
            "name": "view",
            "rules": [
              {
                "verbs": [
                  "get",
                  "list",
                  "watch"
                ],
                "apiGroups": [
                  "*"
                ],
                "resources": [
                  "namespaces",
                  "limitranges",
                  "resourcequotas",
                  "serviceaccounts",
                  "quotas",
                  "abnormalworkloads",
                  "workloads"
                ]
              },
              {
                "verbs": [
                  "list"
                ],
                "apiGroups": [
                  "*"
                ],
                "resources": [
                  "users",
                  "roles"
                ]
              },
              {
                "verbs": [
                  "list",
                  "get"
                ],
                "apiGroups": [
                  "*"
                ],
                "resources": [
                  "events"
                ]
              }
            ]
          },
          {
            "name": "edit",
            "rules": [
              {
                "verbs": [
                  "update",
                  "patch"
                ],
                "apiGroups": [
                  ""
                ],
                "resources": [
                  "namespaces",
                  "limitranges"
                ]
              }
            ]
          },
          {
            "name": "delete",
            "rules": [
              {
                "verbs": [
                  "delete"
                ],
                "apiGroups": [
                  ""
                ],
                "resources": [
                  "namespaces",
                  "limitranges"
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "monitoring",
        "actions": [
          {
            "name": "view",
            "rules": [
              {
                "verbs": [
                  "get",
                  "list"
                ],
                "apiGroups": [
                  "monitoring.kubesphere.io"
                ],
                "resources": [
                  "*"
                ]
              },
              {
                "verbs": [
                  "get",
                  "list"
                ],
                "apiGroups": [
                  "resources.kubesphere.io"
                ],
                "resources": [
                  "health"
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "alerting",
        "actions": [
          {
            "name": "view",
            "rules": [
              {
                "verbs": [
                  "get",
                  "list"
                ],
                "apiGroups": [
                  "alerting.kubesphere.io"
                ],
                "resources": [
                  "*"
                ]
              }
            ]
          },
          {
            "name": "create",
            "rules": [
              {
                "verbs": [
                  "create"
                ],
                "apiGroups": [
                  "alerting.kubesphere.io"
                ],
                "resources": [
                  "*"
                ]
              }
            ]
          },
          {
            "name": "delete",
            "rules": [
              {
                "verbs": [
                  "delete"
                ],
                "apiGroups": [
                  "alerting.kubesphere.io"
                ],
                "resources": [
                  "*"
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "members",
        "actions": [
          {
            "name": "view",
            "rules": [
              {
                "verbs": [
                  "get",
                  "list"
                ],
                "apiGroups": [
                  "rbac.authorization.k8s.io",
                  "resources.kubesphere.io"
                ],
                "resources": [
                  "rolebindings"
                ]
              },
              {
                "verbs": [
                  "get",
                  "list"
                ],
                "apiGroups": [
                  "iam.kubesphere.io"
                ],
                "resources": [
                  "users"
                ]
              }
            ]
          },
          {
            "name": "create",
            "rules": [
              {
                "verbs": [
                  "create"
                ],
                "apiGroups": [
                  "rbac.authorization.k8s.io"
                ],
                "resources": [
                  "rolebindings"
                ]
              }
            ]
          },
          {
            "name": "edit",
            "rules": [
              {
                "verbs": [
                  "get",
                  "watch",
                  "list",
                  "create",
                  "update",
                  "patch"
                ],
                "apiGroups": [
                  "rbac.authorization.k8s.io"
                ],
                "resources": [
                  "rolebindings"
                ]
              }
            ]
          },
          {
            "name": "delete",
            "rules": [
              {
                "verbs": [
                  "delete"
                ],
                "apiGroups": [
                  "rbac.authorization.k8s.io"
                ],
                "resources": [
                  "rolebindings"
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "roles",
        "actions": [
          {
            "name": "view",
            "rules": [
              {
                "verbs": [
                  "get",
                  "list"
                ],
                "apiGroups": [
                  "rbac.authorization.k8s.io",
                  "resources.kubesphere.io"
                ],
                "resources": [
                  "roles"
                ]
              }
            ]
          },
          {
            "name": "create",
            "rules": [
              {
                "verbs": [
                  "create"
                ],
                "apiGroups": [
                  "rbac.authorization.k8s.io"
                ],
                "resources": [
                  "roles"
                ]
              }
            ]
          },
          {
            "name": "edit",
            "rules": [
              {
                "verbs": [
                  "patch",
                  "update"
                ],
                "apiGroups": [
                  "rbac.authorization.k8s.io"
                ],
                "resources": [
                  "roles"
                ]
              }
            ]
          },
          {
            "name": "delete",
            "rules": [
              {
                "verbs": [
                  "delete"
                ],
                "apiGroups": [
                  "rbac.authorization.k8s.io"
                ],
                "resources": [
                  "roles"
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "deployments",
        "actions": [
          {
            "name": "view",
            "rules": [
              {
                "verbs": [
                  "get",
                  "list"
                ],
                "apiGroups": [
                  "apps",
                  "extensions",
                  "resources.kubesphere.io"
                ],
                "resources": [
                  "deployments",
                  "deployments/scale"
                ]
              },
              {
                "verbs": [
                  "get",
                  "list"
                ],
                "apiGroups": [
                  ""
                ],
                "resources": [
                  "pods",
                  "pods/*"
                ]
              }
            ]
          },
          {
            "name": "create",
            "rules": [
              {
                "verbs": [
                  "create"
                ],
                "apiGroups": [
                  "apps",
                  "extensions"
                ],
                "resources": [
                  "deployments"
                ]
              }
            ]
          },
          {
            "name": "edit",
            "rules": [
              {
                "verbs": [
                  "update",
                  "patch"
                ],
                "apiGroups": [
                  "apps",
                  "extensions"
                ],
                "resources": [
                  "deployments",
                  "deployments/*"
                ]
              }
            ]
          },
          {
            "name": "delete",
            "rules": [
              {
                "verbs": [
                  "delete"
                ],
                "apiGroups": [
                  "apps",
                  "extensions"
                ],
                "resources": [
                  "deployments"
                ]
              }
            ]
          },
          {
            "name": "scale",
            "rules": [
              {
                "verbs": [
                  "update",
                  "patch"
                ],
                "apiGroups": [
                  "apps",
                  "extensions"
                ],
                "resources": [
                  "deployments/scale"
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "statefulsets",
        "actions": [
          {
            "name": "view",
            "rules": [
              {
                "verbs": [
                  "get",
                  "list"
                ],
                "apiGroups": [
                  "apps",
                  "resources.kubesphere.io"
                ],
                "resources": [
                  "statefulsets"
                ]
              },
              {
                "verbs": [
                  "get",
                  "list"
                ],
                "apiGroups": [
                  ""
                ],
                "resources": [
                  "pods",
                  "pods/*"
                ]
              }
            ]
          },
          {
            "name": "create",
            "rules": [
              {
                "verbs": [
                  "create"
                ],
                "apiGroups": [
                  "apps"
                ],
                "resources": [
                  "statefulsets"
                ]
              }
            ]
          },
          {
            "name": "edit",
            "rules": [
              {
                "verbs": [
                  "update",
                  "patch"
                ],
                "apiGroups": [
                  "apps"
                ],
                "resources": [
                  "statefulsets"
                ]
              }
            ]
          },
          {
            "name": "delete",
            "rules": [
              {
                "verbs": [
                  "delete"
                ],
                "apiGroups": [
                  "apps"
                ],
                "resources": [
                  "statefulsets"
                ]
              }
            ]
          },
          {
            "name": "scale",
            "rules": [
              {
                "verbs": [
                  "patch"
                ],
                "apiGroups": [
                  "apps"
                ],
                "resources": [
                  "statefulsets"
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "daemonsets",
        "actions": [
          {
            "name": "view",
            "rules": [
              {
                "verbs": [
                  "get",
                  "list"
                ],
                "apiGroups": [
                  "apps",
                  "extensions",
                  "resources.kubesphere.io"
                ],
                "resources": [
                  "daemonsets"
                ]
              },
              {
                "verbs": [
                  "get",
                  "list"
                ],
                "apiGroups": [
                  ""
                ],
                "resources": [
                  "pods",
                  "pods/*"
                ]
              }
            ]
          },
          {
            "name": "create",
            "rules": [
              {
                "verbs": [
                  "create"
                ],
                "apiGroups": [
                  "apps",
                  "extensions"
                ],
                "resources": [
                  "daemonsets"
                ]
              }
            ]
          },
          {
            "name": "edit",
            "rules": [
              {
                "verbs": [
                  "update",
                  "patch"
                ],
                "apiGroups": [
                  "apps",
                  "extensions"
                ],
                "resources": [
                  "daemonsets"
                ]
              }
            ]
          },
          {
            "name": "delete",
            "rules": [
              {
                "verbs": [
                  "delete"
                ],
                "apiGroups": [
                  "apps",
                  "extensions"
                ],
                "resources": [
                  "daemonsets"
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "pods",
        "actions": [
          {
            "name": "terminal",
            "rules": [
              {
                "verbs": [
                  "get"
                ],
                "apiGroups": [
                  "terminal.kubesphere.io"
                ],
                "resources": [
                  "pods"
                ]
              }
            ]
          },
          {
            "name": "view",
            "rules": [
              {
                "verbs": [
                  "get",
                  "list"
                ],
                "apiGroups": [
                  "resources.kubesphere.io"
                ],
                "resources": [
                  "pods"
                ]
              }
            ]
          },
          {
            "name": "delete",
            "rules": [
              {
                "verbs": [
                  "delete"
                ],
                "apiGroups": [
                  ""
                ],
                "resources": [
                  "pods"
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "services",
        "actions": [
          {
            "name": "view",
            "rules": [
              {
                "verbs": [
                  "list",
                  "get"
                ],
                "apiGroups": [
                  "",
                  "resources.kubesphere.io"
                ],
                "resources": [
                  "services"
                ]
              }
            ]
          },
          {
            "name": "create",
            "rules": [
              {
                "verbs": [
                  "create"
                ],
                "apiGroups": [
                  ""
                ],
                "resources": [
                  "services"
                ]
              }
            ]
          },
          {
            "name": "edit",
            "rules": [
              {
                "verbs": [
                  "update",
                  "patch"
                ],
                "apiGroups": [
                  ""
                ],
                "resources": [
                  "services"
                ]
              }
            ]
          },
          {
            "name": "delete",
            "rules": [
              {
                "verbs": [
                  "delete"
                ],
                "apiGroups": [
                  ""
                ],
                "resources": [
                  "services"
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "advanced",
        "actions": [
          {
            "name": "view",
            "rules": [
              {
                "verbs": [
                  "get",
                  "list"
                ],
                "apiGroups": [
                  "resources.kubesphere.io"
                ],
                "resources": [
                  "router"
                ]
              }
            ]
          },
          {
            "name": "manage",
            "rules": [
              {
                "verbs": [
                  "get",
                  "list",
                  "create",
                  "update",
                  "patch",
                  "delete"
                ],
                "apiGroups": [
                  "resources.kubesphere.io"
                ],
                "resources": [
                  "router"
                ]
              },
              {
                "verbs": [
                  "patch",
                  "update"
                ],
                "apiGroups": [
                  ""
                ],
                "resources": [
                  "namespaces"
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "s2ibuilders",
        "actions": [
          {
            "name": "view",
            "rules": [
              {
                "verbs": [
                  "get",
                  "list"
                ],
                "apiGroups": [
                  "devops.kubesphere.io",
                  "resources.kubesphere.io"
                ],
                "resources": [
                  "s2ibuilders",
                  "s2iruns"
                ]
              }
            ]
          },
          {
            "name": "create",
            "rules": [
              {
                "verbs": [
                  "create"
                ],
                "apiGroups": [
                  "devops.kubesphere.io"
                ],
                "resources": [
                  "s2ibuilders",
                  "s2iruns"
                ]
              }
            ]
          },
          {
            "name": "edit",
            "rules": [
              {
                "verbs": [
                  "update",
                  "patch"
                ],
                "apiGroups": [
                  "devops.kubesphere.io"
                ],
                "resources": [
                  "s2ibuilders",
                  "s2iruns"
                ]
              }
            ]
          },
          {
            "name": "delete",
            "rules": [
              {
                "verbs": [
                  "delete"
                ],
                "apiGroups": [
                  "devops.kubesphere.io"
                ],
                "resources": [
                  "s2ibuilders",
                  "s2iruns"
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "routes",
        "actions": [
          {
            "name": "view",
            "rules": [
              {
                "verbs": [
                  "get",
                  "list"
                ],
                "apiGroups": [
                  "extensions",
                  "resources.kubesphere.io"
                ],
                "resources": [
                  "ingresses"
                ]
              }
            ]
          },
          {
            "name": "create",
            "rules": [
              {
                "verbs": [
                  "create"
                ],
                "apiGroups": [
                  "extensions"
                ],
                "resources": [
                  "ingresses"
                ]
              }
            ]
          },
          {
            "name": "edit",
            "rules": [
              {
                "verbs": [
                  "update",
                  "patch"
                ],
                "apiGroups": [
                  "extensions"
                ],
                "resources": [
                  "ingresses"
                ]
              }
            ]
          },
          {
            "name": "delete",
            "rules": [
              {
                "verbs": [
                  "delete"
                ],
                "apiGroups": [
                  "extensions"
                ],
                "resources": [
                  "ingresses"
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "volumes",
        "actions": [
          {
            "name": "view",
            "rules": [
              {
                "verbs": [
                  "get",
                  "list"
                ],
                "apiGroups": [
                  "",
                  "resources.kubesphere.io"
                ],
                "resources": [
                  "persistentvolumeclaims"
                ]
              }
            ]
          },
          {
            "name": "create",
            "rules": [
              {
                "verbs": [
                  "create"
                ],
                "apiGroups": [
                  ""
                ],
                "resources": [
                  "persistentvolumeclaims"
                ]
              }
            ]
          },
          {
            "name": "edit",
            "rules": [
              {
                "verbs": [
                  "update",
                  "patch"
                ],
                "apiGroups": [
                  ""
                ],
                "resources": [
                  "persistentvolumeclaims"
                ]
              }
            ]
          },
          {
            "name": "delete",
            "rules": [
              {
                "verbs": [
                  "delete"
                ],
                "apiGroups": [
                  ""
                ],
                "resources": [
                  "persistentvolumeclaims"
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "applications",
        "actions": [
          {
            "name": "view",
            "rules": [
              {
                "verbs": [
                  "get",
                  "list",
                  "watch"
                ],
                "apiGroups": [
                  "app.k8s.io",
                  "resources.kubesphere.io"
                ],
                "resources": [
                  "applications"
                ]
              },
              {
                "verbs": [
                  "get",
                  "list",
                  "watch"
                ],
                "apiGroups": [
                  "servicemesh.kubesphere.io"
                ],
                "resources": [
                  "*"
                ]
              }
            ]
          },
          {
            "name": "create",
            "rules": [
              {
                "verbs": [
                  "create"
                ],
                "apiGroups": [
                  "app.k8s.io"
                ],
                "resources": [
                  "applications"
                ]
              },
              {
                "verbs": [
                  "create"
                ],
                "apiGroups": [
                  "servicemesh.kubesphere.io"
                ],
                "resources": [
                  "*"
                ]
              }
            ]
          },
          {
            "name": "edit",
            "rules": [
              {
                "verbs": [
                  "create",
                  "update",
                  "patch"
                ],
                "apiGroups": [
                  "app.k8s.io"
                ],
                "resources": [
                  "applications"
                ]
              },
              {
                "verbs": [
                  "create",
                  "update",
                  "patch"
                ],
                "apiGroups": [
                  "servicemesh.kubesphere.io"
                ],
                "resources": [
                  "*"
                ]
              }
            ]
          },
          {
            "name": "delete",
            "rules": [
              {
                "verbs": [
                  "delete"
                ],
                "apiGroups": [
                  "app.k8s.io"
                ],
                "resources": [
                  "applications"
                ]
              },
              {
                "verbs": [
                  "delete"
                ],
                "apiGroups": [
                  "servicemesh.kubesphere.io"
                ],
                "resources": [
                  "*"
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "jobs",
        "actions": [
          {
            "name": "view",
            "rules": [
              {
                "verbs": [
                  "get",
                  "list"
                ],
                "apiGroups": [
                  "batch",
                  "resources.kubesphere.io"
                ],
                "resources": [
                  "jobs"
                ]
              }
            ]
          },
          {
            "name": "create",
            "rules": [
              {
                "verbs": [
                  "create"
                ],
                "apiGroups": [
                  "batch"
                ],
                "resources": [
                  "jobs"
                ]
              }
            ]
          },
          {
            "name": "edit",
            "rules": [
              {
                "verbs": [
                  "update",
                  "patch"
                ],
                "apiGroups": [
                  "batch"
                ],
                "resources": [
                  "jobs"
                ]
              }
            ]
          },
          {
            "name": "delete",
            "rules": [
              {
                "verbs": [
                  "delete"
                ],
                "apiGroups": [
                  "batch"
                ],
                "resources": [
                  "jobs"
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "cronjobs",
        "actions": [
          {
            "name": "view",
            "rules": [
              {
                "verbs": [
                  "get",
                  "list"
                ],
                "apiGroups": [
                  "batch",
                  "resources.kubesphere.io"
                ],
                "resources": [
                  "cronjobs"
                ]
              }
            ]
          },
          {
            "name": "create",
            "rules": [
              {
                "verbs": [
                  "create"
                ],
                "apiGroups": [
                  "batch"
                ],
                "resources": [
                  "cronjobs"
                ]
              }
            ]
          },
          {
            "name": "edit",
            "rules": [
              {
                "verbs": [
                  "update",
                  "patch"
                ],
                "apiGroups": [
                  "batch"
                ],
                "resources": [
                  "cronjobs"
                ]
              }
            ]
          },
          {
            "name": "delete",
            "rules": [
              {
                "verbs": [
                  "delete"
                ],
                "apiGroups": [
                  "batch"
                ],
                "resources": [
                  "cronjobs"
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "secrets",
        "actions": [
          {
            "name": "view",
            "rules": [
              {
                "verbs": [
                  "get",
                  "list"
                ],
                "apiGroups": [
                  "",
                  "resources.kubesphere.io"
                ],
                "resources": [
                  "secrets"
                ]
              }
            ]
          },
          {
            "name": "create",
            "rules": [
              {
                "verbs": [
                  "create"
                ],
                "apiGroups": [
                  ""
                ],
                "resources": [
                  "secrets"
                ]
              }
            ]
          },
          {
            "name": "edit",
            "rules": [
              {
                "verbs": [
                  "update",
                  "patch"
                ],
                "apiGroups": [
                  ""
                ],
                "resources": [
                  "secrets"
                ]
              }
            ]
          },
          {
            "name": "delete",
            "rules": [
              {
                "verbs": [
                  "delete"
                ],
                "apiGroups": [
                  ""
                ],
                "resources": [
                  "secrets"
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "configmaps",
        "actions": [
          {
            "name": "view",
            "rules": [
              {
                "verbs": [
                  "get",
                  "list"
                ],
                "apiGroups": [
                  "",
                  "resources.kubesphere.io"
                ],
                "resources": [
                  "configmaps"
                ]
              }
            ]
          },
          {
            "name": "create",
            "rules": [
              {
                "verbs": [
                  "create"
                ],
                "apiGroups": [
                  ""
                ],
                "resources": [
                  "configmaps"
                ]
              }
            ]
          },
          {
            "name": "edit",
            "rules": [
              {
                "verbs": [
                  "update",
                  "patch"
                ],
                "apiGroups": [
                  ""
                ],
                "resources": [
                  "configmaps"
                ]
              }
            ]
          },
          {
            "name": "delete",
            "rules": [
              {
                "verbs": [
                  "delete"
                ],
                "apiGroups": [
                  ""
                ],
                "resources": [
                  "configmaps"
                ]
              }
            ]
          }
        ]
      }
    ]
kind: ConfigMap
metadata:
  name: policy-rules
  namespace: kubesphere-system